<template>
  <!-- PDF预览 -->
  <iframe :src="url" type="application/x-google-chrome-pdf" width="100%" height="640px" />
</template>

<script>
import { getInfo } from '@/api/projectFile'

export default {
  name: 'Pdf',
  props: {
    proid: {
      type: String,
      required: true
    }
  },
  data() {
    return {
      url: ''
    }
  },
  created() {
    this.getDetailed()
  },
  methods: {
    getDetailed() {
      getInfo({ code: this.proid }).then(response => {
        this.url = response.data[0].url
      }).catch(function() {
      })
    }
  }
}
</script>
<style>
</style>
